<div class="container">
  <div
    dnd-list="$ctrl.mixDatabaseNavs"
    dnd-inserted="$ctrl.updateOrders(index)"
  >
    <div
      ng-repeat="item in $ctrl.mixDatabaseNavs | orderBy: 'priority' track by $index"
      dnd-draggable="item"
      dnd-type="'item'"
      dnd-effect-allowed="copyMove"
      dnd-selected="$ctrl.selectedItem = item"
      dnd-dragstart="$ctrl.dragStart($index)"
      ng-class="{'selected': $ctrl.selectedItem === item}"
      class="row"
    >
      <table class="table table-sm mb-0 border-top-0">
        <tbody>
          <tr>
            <th scope="row" width="20px" class="align-middle">
              <span class="fa fa-grip-vertical fa-xs text-black-50"></span>
            </th>
            <td class="align-middle">
              <div class="form-check form-switch">
                <input
                  type="checkbox"
                  class="form-check-input"
                  id="customSwitch_{{item.id}}"
                  ng-model="item.isActived"
                  ng-change="$ctrl.change(item)"
                />
                <label
                  class="custom-control-label"
                  for="customSwitch_{{item.id}}"
                  ng-bind="item.data.title"
                ></label>
              </div>
              <!-- <input type="checkbox" ng-model="item.isActived" ng-change="$ctrl.save(item)"> -->
            </td>
            <!-- <td class="align-middle"><span ng-bind="item.data.title"></span></td> -->
            <td class="align-middle" width="5%">
              <a
                ng-click="$ctrl.goToPath('/portal/mix-database/details/' + item.mixDatabaseId)"
                class="btn btn-link text-primary"
              >
                <span class="fas fa-pen"></span>
              </a>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
<!-- <tabs-v class="mb-3" ng-if="$ctrl.parentId">
    <pane-v header="{{nav.data.title}}" id="pane-container-{{nav.data.id}}" class="card"
        ng-repeat="nav in $ctrl.mixDatabaseNavs | orderBy: 'priority' track by $index" ng-if="nav.isActived">
        <div class="card-body">
            <mix-database-nav-data nav="nav" parent-id="$ctrl.parentId" parent-type="$ctrl.parentType"></mix-database-nav-data>
        </div>
    </pane-v>
</tabs-v> -->
